<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <title>{$seo.title|default='易贝云系统'}</title>
    <meta name="keywords" content="{$seo.keywords|default='ebcms,易贝cms,内容管理系统'}">
    <meta name="description" content="{$seo.description|default='易贝云系统是一款开源的php内容管理系统'}">
    <!-- Bootstrap -->
    <link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- 前端公共样式 -->
    <style>
        @charset "UTF-8";
        body{
            margin: 10px 0px;
        }
        body img{
            max-width: 100%;
        }
        a img{
            max-width: none;
        }
        *{
            outline: none;
        }
        *:focus{
            outline:none;
        }
        a:focus{
            outline:none;
        }
        input:focus{
            outline:none;
        }
        button:focus{
            outline:none;
        }
        button:active{
            outline:none;
        }

        a{
            outline: none;
            color: #555;
        }
    </style>
    {php}
        \think\Hook::listen('home_head');
    {/php}
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-md-4">
                <div style="padding:10px;width: 250px;">
                    <img src="__ROOT__/system/image/logo.png">
                </div>
            </div>
            <div class="col-md-8 hidden-xs">
                {if condition="check_app('mbzs')"}
                <div style="padding:10px 0;" class="pull-right">
                    <img src="{:\\app\\mbzs\\Zs::get('header_banner','头部banner')}" height="70" alt="">
                </div>
                {/if}
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <nav class="navbar navbar-default">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="{:url('index/index/index')}">EBCMS</a>
                    </div>
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                            <li><a href="{:url('index/index/index')}">首页</a></li>
                            <!-- 后台主导航分组下添加的导航链接 -->
                            {php}
                                $nav = new \app\ebcms\model\Nav();
                                $nav = $nav -> lists() -> where('group','主导航') -> select();
                                $nav = \ebcms\Tree::tree($nav);
                            {/php}
                            {foreach name="nav" item="vo" }
                                {notempty name='vo.rows'}
                                    <li class="dropdown">
                                        <a href="{$vo.url}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{$vo.title} <span class="caret"></span></a>
                                        <ul class="dropdown-menu">
                                            {foreach name='vo.rows' item='sub'}
                                            <li><a href="{$sub.url}" target="{$sub.target}">{$sub.title}</a></li>
                                            {/foreach}
                                        </ul>
                                    </li>
                                {else /}
                                    <li><a href="{$vo.url}" target="{$vo.target}">{$vo.title}</a></li>
                                {/notempty}
                            {/foreach}
                        </ul>
                        <ul class="nav navbar-nav navbar-right">
                            {if condition="check_app('user')"}
                                {if condition='is_login()'}
                                <li><a href="{:url('user/index/index')}">会员中心 <span class="badge">{:user('message_count')}</span></a></li>
                                {else /}
                                <li><a href="{:url('user/auth/login')}">登录</a></li>
                                {/if}
                            {/if}
                        </ul>
                    </div>
                </nav>
            </div>
        </div>

        <!-- 当前位置 -->
        {php}
        $position = \ebcms\Position::get();
        {/php}
        {if condition="count($position) > 1"}
        <div class="row">
            <div class="col-md-12">
                <ol class="breadcrumb">
                {foreach name='position' item='vo'}
                    <li><a href="{$vo.url}">{$vo.title}</a></li>
                {/foreach}
                </ol>
            </div>
        </div>
        {/if}